<?php

namespace App\Http\Requests\Admin\MenuNav;
use App\Http\Requests\Request;
use Illuminate\Support\Facades\Input;

class UpdateRequest extends Request{
    public function authorize(){
        return true;
    }
    public function rules(){
        return [
            'nav_name' => 'required|unique:menu_navigation,nav_name,'.$this->id,
            'nav_url' => 'required',
            'nav_sort' => 'integer',
        ];
    }
    public function messages(){
        return [
            'nav_name.required' => '菜单导航名称必须填写',
            'nav_name.unique' => '菜单导航名称已经存在',
            'nav_url.required' => '菜单导航url地址必须填写',
            'nav_sort.integer' => '菜单导航排序必须是整数',
        ];
    }
}